package com.aqiang.day0528_shop.main.contract

import com.aqiang.day0528_shop.main.entity.BaseEntity
import com.aqiang.day0528_shop.main.entity.GoodsTypeEntity
import com.aqiang.day0528_shop.main.entity.NewEntity
import com.aqiang.lib_core.mvp.BasePresenter
import com.aqiang.lib_core.mvp.IModel
import com.aqiang.lib_core.mvp.IView
import kotlinx.coroutines.Deferred

interface StairContract {
    interface StairView : IView{
        fun stairId():Int
        fun initStair(data:Deferred<BaseEntity<List<GoodsTypeEntity>>>)
        fun secondId():Int
        fun initsecond(data:Deferred<BaseEntity<List<NewEntity>>>)
        fun tId():Int
        fun initT(data:Deferred<BaseEntity<List<GoodsTypeEntity>>>)
    }

    interface StairModel : IModel{
        fun stair(parentId:Int):Deferred<BaseEntity<List<GoodsTypeEntity>>>
        fun second(parentId:Int):Deferred<BaseEntity<List<NewEntity>>>
        fun T(parentId:Int):Deferred<BaseEntity<List<GoodsTypeEntity>>>
    }

    abstract class StairPresenter(v:StairView) : BasePresenter<StairModel,StairView>(v){
        abstract fun stair()
        abstract fun second()
        abstract fun T()
    }
}